package com.xxg.renrensearch.repository;

import com.xxg.renrensearch.dao.Product;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * 商品索引库操作接口
 *
 * @author xuxiaogang
 * @date 2021-11-24
 */
public interface ProductRepository extends ElasticsearchRepository<Product, String> {
    /**
     * 根据spuId查询所有规格商品
     *
     * @param spuId 商品spuId
     * @return 结果
     */
    List<Product> findBySpuIdOrderBySkuIdAsc(Integer spuId);
}
